#include "stdafx.h"

USING_NAMESPACE_BENTLEY_SQLITE
USING_NAMESPACE_BENTLEY_SQLITE_EC
USING_NAMESPACE_EC
USING_NAMESPACE_BENTLEY_DGNPLATFORM
USING_NAMESPACE_BENTLEY_MOBILEDGN
USING_NAMESPACE_PBBIM_CORE
USING_NAMESPACE_PBBIM_COREMODEL
USING_NAMESPACE_PBBIM_ARCHMODEL

/*---------------------------------------------------------------------------------**//**
* @bsimethod                                    %Author%                       %CreateTime%
+---------------+---------------+---------------+---------------+---------------+------*/

%Class%Tool::%Class%Tool(): DgnPrimitiveTool(0)
{
}

/*---------------------------------------------------------------------------------**//**
* @bsimethod                                    %Author%                       %CreateTime%
+---------------+---------------+---------------+---------------+---------------+------*/
%Class%Tool::~%Class%Tool()
{
}

void %Class%Tool::_OnPostInstall()
{
    T_Super::_OnPostInstall();

    AccuDraw::GetInstance().Deactivate();
    AccuSnap::GetInstance().EnableLocate(false);
    AccuSnap::GetInstance().EnableSnap(true);
}

void %Class%Tool::_OnRestartTool()
{
    %Class%Tool* newTool = new %Class%Tool();
    newTool->InstallTool();
}

bool %Class%Tool::_OnDataButton(DgnButtonEventCP ev)
{
    m_points.push_back(*ev->GetPoint());

    return true;
}

bool %Class%Tool::_OnResetButton(DgnButtonEventCP)
{
    _ExitTool();

    return true;
}

void %Class%Tool::_OnDynamicFrame(DgnButtonEventCP ev)
{
    if (NULL == ev)
        return;
}

//---------------------------------------------------------------------------------------
// @bsimethod                                  %Author%                       %CreateTime%
//--------------------------------------------------------------------------------------
bool %Class%Tool::_OnInstall()
{
	if (!T_Super::_OnInstall())
		return false;

	return true;
}
